from datetime import datetime, timedelta
date_str = input().strip()
date_obj = datetime.strptime(date_str, '%Y-%m-%d')
date_before_yesterday = date_obj - timedelta(days=2)
print(date_before_yesterday.strftime('%Y-%m-%d'))